From 5561194ed953c88d6238b1135dcad6c69fa0accb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 21 Jan 2014 18:45:30 +0000 Subject: [PATCH] xl: Free optdata_begin when saving domain config This makes valgrind a bit happier. It is also Coverity-CID: 1055903 Signed-off-by: Ian Jackson Cc: Ian Campbell Acked-by: Ian Campbell --- tools/libxl/xl_cmdimpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index d93e01b408..aff6f908bf 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -3442,6 +3442,8 @@ static void save_domain_core_writeconfig(int fd, const char *source, ctx, fd, optdata_begin, hdr.optional_data_len, source, "header")); + free(optdata_begin); + fprintf(stderr, "Saving to %s new xl format (info" " 0x%"PRIx32"/0x%"PRIx32"/%"PRIu32")\n", source, hdr.mandatory_flags, hdr.optional_flags, -- 2.30.2